<template>
  <div style="height: 100%;background-color:white ;padding: 5px">
    <div>
      <div style="display: inline-block">
        <el-button @click="goBack" icon="el-icon-back" size="small" type="text">返回</el-button>
      </div>
      <div style="display: inline-block">|</div>
      <div style="display: inline-block;">
        <div style="padding-bottom: 15px;margin-left:10px">
          <span style=" font-family: 'Microsoft YaHei',serif;display: inline-block">推送日志</span>
        </div>
      </div>
      <div style="border-bottom: solid 1px #C9C9C9;"></div>
    </div>
    <div style="margin-top: 10px">
      <label> 公式名称: {{ $route.query.calculatorName }}</label>
    </div>
    <el-row>
      <el-table highlight-current-row :data="syncLogTableData" border max-height="500" stripe style="width: 100%;margin-top: 10px">
        <el-table-column label="操作人" prop="operatedBy"></el-table-column>
        <el-table-column label="推送平台" prop="platformId"></el-table-column>
        <el-table-column label="推送状态" prop="syncFlag">
          <template slot-scope="scope">
            <span v-if="scope.row.syncFlag">推送成功</span>
            <span style="color: red" v-else>推送失败</span>
          </template>
        </el-table-column>
        <el-table-column :formatter="UTIL.dateFormat" label="记录时间" prop="operatedTime">
        </el-table-column>
      </el-table>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "SyncLog",
  data() {
    return {
      syncLogTableData: [],
    }
  },
  methods: {
      goBack: function () {
        this.$router.go(-1)
      },
    },
    created() {
      this.axios.get('/pmph/action/medicalCalculator/selectSyncLog', {
        params: {
          id: this.$route.query.id
        }
      }).then((response) => {
        this.syncLogTableData = response.data;
      })
    }
  }
</script>

<style scoped>

</style>
